<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en" class="no-js" id="ng-app">
<head>
<meta charset="UTF-8">
<jsp:include page="/includes/common/head.jsp" />
<title>CS4280 BOOKSTORE</title>
</head>
<body>
	<div data-flex-background-src="${ baseURL }/assets/img/background.jpg" flex-background></div>
	<jsp:include page="/includes/header.jsp">
   		<jsp:param name="currentUser" value="${currentUser}" />
   		<jsp:param name="baseURL" value="${ baseURL }" />
	</jsp:include>
	<section id="mainContent">
		<table class="book_list shush-table">
			<c:forEach var="book" items="${books}" varStatus="bookIndex">
				<c:if test="${bookIndex.index % 4 == 0}">
					<tr>
				</c:if>
					<td>
						<jsp:include page="/includes/book_item.jsp?id=${book.id}&title=${book.title}&price=${book.price}&qty=${book.quantity}"/>
					</td>
				<c:if test="${bookIndex.index % 4 == 3}">
					</tr>
				</c:if>
			</c:forEach>
		</table>
	</section>
</body>
</html>
